<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/2/28
 * Time: 16:38
 */
namespace app\models;

use Yii;
class ContentComment extends \yii\db\ActiveRecord{
    /**
     * @inheritdoc
     */

    public static function tableName()
    {
        return '{{%content_comment}}';
    }
    /**
     * @inheritdoc
     */
    public  function rules(){
        return [
            [['content_id','praise',  'type'], 'integer'],
            [['content_id','user_id'],'required'],
            [['comment'],'string'],
        ];
    }
    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'content_id'=>'content_id',
            'type'=>'type',
            'model'=>'model',
        ];
    }
}